package practice1_100;

import java.util.Hashtable;

public class Practice938 {
    public int rangeSumBST(TreeNode root, int low, int high) {
        Hashtable<Integer,String> hashtable=new Hashtable<>();
        if(root==null) return 0;
        int res=0;
        if(root.val>=low&&root.val<=high){
            res= root.val;
        }

//        rangeSumBST(root.left,low,high);
//        ;
        res+=(rangeSumBST(root.left,low,high)+rangeSumBST(root.right,low,high));
        return res;
    }
}
